﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Hydra.UrlMon.Enumerations
{
    /// <summary>Contains the flags that control the asynchronous pluggable protocol handler.</summary>
    [Flags]
    public enum ProtocolFlags : int
    {
        /// <summary>Asynchronous pluggable protocol should parse the URL and return S_OK if the URL is syntactically correct; otherwise S_FALSE.</summary>
        PARSE_URL = 0x1,
        /// <summary>Asynchronous pluggable protocol handler should be running in filter mode and data will come in through the IInternetProtocolSink interface it exposes. The QueryInterface method will be called on the protocol handler for its IInternetProtocolSink interface.</summary>
        FILTER_MODE = 0x2,
        /// <summary>Asynchronous pluggable protocol handler should do as little work as possible on the apartment (or user interface) thread and continue on a worker thread as soon as possible.</summary>
        FORCE_ASYNC = 0x4,
        /// <summary>Asynchronous pluggable protocol handler should use worker threads and not use the apartment thread.</summary>
        USE_WORKERTHREAD = 0x8,
        /// <summary>Asynchronous pluggable protocol handler should verify and report the MIME type.</summary>
        MIMEVERIFICATION = 0x10,
        /// <summary>Asynchronous pluggable protocol handler should find the CLSID associated with the MIME type.</summary>
        CLSIDLOOKUP = 0x20,
        /// <summary>Asynchronous pluggable protocol handler should report its progress.</summary>
        DATAPROGRESS = 0x40,
        /// <summary>Asynchronous pluggable protocol handler should work synchronously.</summary>
        SYNCHRONOUS = 0x80,
        /// <summary>Asynchronous pluggable protocol handler should use the apartment (or user interface) thread only.</summary>
        APARTMENTTHREADED = 0x100,
        /// <summary>Asynchronous pluggable protocol handler should install the class if the class is not found.</summary>
        CLASSINSTALL = 0x200,
        /// <summary>Asynchronous pluggable protocol handler should pass address of the IBindCtx interface to the pUnk member of the PROTOCOLFILTERDATA structure.</summary>
        PASSONBINDCTX = 0x2000,
        /// <summary>Asynchronous pluggable protocol handler should disable MIME filters.</summary>
        NOMIMEHANDLER = 0x8000,
        /// <summary>Asynchronous pluggable protocol handler should load the application directly.</summary>
        LOADAPPDIRECT = 0x4000,
        /// <summary>Asynchronous pluggable protocol handler should switch to the apartment thread, even if it does not need to.</summary>
        PD_FORCE_SWITCH = 0x10000,
        /// <summary>Not currently supported. This type is obsolete. Do not use.</summary>
        PREFERDEFAULTHANDLER = 0x20000
    }
}
